<%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*,java.text.*"%>
<%@ include file="Connections/conDB.jsp" %>
<% int validaSession = 2; %>
<%@ include file="Connections/session.jsp" %>

<%
String parOpc = request.getParameter("opc");
String parId_movimiento = request.getParameter("id_movim");
String rsObservacion = "";

Driver DriverRs = (Driver)Class.forName(MM_conDB_DRIVER).newInstance();
Connection ConnRs = DriverManager.getConnection(MM_conDB_STRING,MM_conDB_USERNAME,MM_conDB_PASSWORD);
String query = "";
if (parOpc.equals("movimiento")) {
	query = "SELECT observacion FROM movimiento WHERE id_movimiento = "+parId_movimiento;
} else {
	query = "SELECT observ_trans FROM movimiento WHERE id_movimiento = "+parId_movimiento;
}

//out.print(query);
PreparedStatement StatementRs = ConnRs.prepareStatement(query);
ResultSet Rsquery = StatementRs.executeQuery();

if (Rsquery.next()) {
	if (parOpc.equals("movimiento")) {
		rsObservacion = Rsquery.getString("observacion");
	} else {
		rsObservacion = Rsquery.getString("observ_trans");
	}
	rsObservacion = (rsObservacion!=null)?rsObservacion:"&nbsp;";
}

%>
<html>
<head>
<title>CIMA v2 - Bitacoras Observaciones</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="miestilo.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" background="images/fondo.jpg">
<center>
<br>
  <table width="350" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td align="center" class="titulos">Observaciones</td>
  </tr>
</table>
<br>
  <table width="350" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td class="textcolumna" align="center"><%=rsObservacion%></td>
   </tr>
  </table>
  <br>
  <table width="200" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td align="center"><a href="javascript:window.close()"><img src="images/bCerrar.gif" width="82" height="18" border="0"></a></td>
    </tr>
  </table>
</center>
</body>
</html>
<%
Rsquery.close();
StatementRs.close();
ConnRs.close();
%>
